// 蜂窝蜜造平台生成代码，如手工更改，请添加到 .beeignore 忽略生成

package com.fowo.api.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fowo.api.common.model.OptionItem;
import com.fowo.api.entity.ShopInfo;
import com.fowo.api.model.shop.info.ShopInfoItemVo;
import com.fowo.api.model.shop.info.ShopInfoItemVoPages;
import com.fowo.api.model.shop.info.ShopInfoSearchParamPo;
import com.fowo.api.model.shop.info.ShopInfoVo;

import java.util.Date;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface ShopInfoMapper extends BaseMapper<ShopInfo> {
    Page<ShopInfoItemVo> pageSearch(
            @Param("page") Page page,
            @Param("search") ShopInfoSearchParamPo search
    );

    List<OptionItem<ShopInfoItemVo>> searchOptions(
            @Param("search") ShopInfoSearchParamPo search
    );

    List<ShopInfoItemVo> search(@Param("search") ShopInfoSearchParamPo search);

    Date searchLastUpdateTime(@Param("search") ShopInfoSearchParamPo search);

    /**
     * 搜索满足条件的所有记录的编号列表
     *
     * @param search 搜索参数
     * @return 编号列表
     */
    List<Long> searchIds(@Param("search") ShopInfoSearchParamPo search);

    /**
     * 搜索满足条件的记录数量
     *
     * @param search 搜索参数
     * @return 记录数量
     */
    Long searchCount(@Param("search") ShopInfoSearchParamPo search);

    Long getIdByShopName(@Param("shopName") String shopName);

    List<Long> getIdsByShopName(@Param("list") List<String> list);

    String getShopNameById(@Param("id") Long id);

    List<Map<String, Object>> getShopNameByIds(@Param("ids") List<Long> ids);

    ShopInfoVo selectVoById(@Param("id") Long id);

    /**
     * 店铺
     */
    List<ShopInfoItemVo> all(@Param("search") ShopInfoSearchParamPo search);

    /**
     * 获取店铺编号列表
     */
    List<Long> allIds(@Param("search") ShopInfoSearchParamPo search);

    /**
     * 获取店铺的总数
     */
    Long allCount(@Param("search") ShopInfoSearchParamPo search);

    /**
     * 店铺分页
     */
    Page<ShopInfoItemVo> allPage(
            @Param("page") Page page,
            @Param("search") ShopInfoSearchParamPo search
    );

    Date allLastUpdateTime(@Param("search") ShopInfoSearchParamPo search);

    /**
     * 选择用视图
     */
    List<ShopInfoItemVo> selectHide(
            @Param("search") ShopInfoSearchParamPo search
    );

    /**
     * 获取选择用视图编号列表
     */
    List<Long> selectHideIds(@Param("search") ShopInfoSearchParamPo search);

    /**
     * 获取选择用视图的总数
     */
    Long selectHideCount(@Param("search") ShopInfoSearchParamPo search);

    /**
     * 选择用视图分页
     */
    Page<ShopInfoItemVo> selectHidePage(
            @Param("page") Page page,
            @Param("search") ShopInfoSearchParamPo search
    );

    Date selectHideLastUpdateTime(@Param("search") ShopInfoSearchParamPo search);

    /**
     * 查询 所属店铺授权 分页下属列表
     */
    List<ShopInfoItemVoPages> selectPagesByParentShopAuthorization(
            @Param("search") ShopInfoSearchParamPo search
    );

    List<ShopInfoVo> selectVoJoinListingByPlatform(@Param("platform") String platform, @Param("fnsku") String fnsku);

    List<ShopInfoVo> selectVoByPlatform(@Param("platform") String platform);

}
